import request from '@/utils/request'

// 查老年衰弱/肌少症询患者列表
export function listPatient(query) {
  return request({
    url: '/his/patient/list',
    method: 'get',
    params: query
  })
}
// 查询阿尔兹海默症/帕金森患者列表
export function listApPatient(query) {
  return request({
    url: '/his/appatient/list',
    method: 'get',
    params: query
  })
}
// 查询实验室卒中患者列表
export function listLsPatient(query) {
  return request({
    url: '/his/lspatient/list',
    method: 'get',
    params: query
  })
}

// 查老年衰弱/肌少症风险
export function listJszRisk(query) {
  return request({
    url: '/his/patient/jszRisk',
    method: 'get',
    params: query
  })
}


// 查脂质过氧化物患者列表
export function listMdaPatient(query) {
  return request({
    url: '/his/patient/mdalist',
    method: 'get',
    params: query
  })
}

// 查询患者详细
export function getPatient(patientId) {
  return request({
    url: '/his/patient/' + patientId,
    method: 'get'
  })
}

// 根据身份证查询患者详细
export function getPatientByidCard(idCard) {
  return request({
    url: '/his/patient/' + idCard,
    method: 'post'
  })
}

//注册用户
export function register(data) {
  return request({
    url: '/register',
    headers: {
      isToken: false
    },
    method: 'post',
    data: data
  })
}

// 新增Mda患者
export function addPatient(data) {
  return request({
    url: '/his/patient/mda',
    method: 'post',
    data: data
  })
}

// 查询Mda患者
export function queryPatient(query) {
  return request({
    url: '/his/patient/mdaQuery',
    method: 'get',
    params: query
  })
}

// 修改患者
export function updatePatient(data) {
  return request({
    url: '/his/patient/mdaEdit',
    method: 'put',
    data: data
  })
}

// 审核患者
export function updateProcess(patientIds) {
  return request({
    url: '/his/patient/process/'+patientIds,
    method: 'get',
  })
}

// 更新血片状态
export function updateBpn(bpns) {
  return request({
    url: '/his/bpn/batchUpdate/'+bpns,
    method: 'get',
  })
}

// 删除患者
export function delPatient(patientId) {
  return request({
    url: '/his/patient/mdaRemove/' + patientId,
    method: 'delete'
  })
}
